<?php
/**
 * Created by JetBrains PhpStorm.
 * User: avnovoselov
 * Date: 25.10.12
 * Time: 1:03
 * To change this template use File | Settings | File Templates.
 */
class seo
{
    public static $seo = array(
        'title'         => 'boobs',
        'description'   => 'boobs - fast framework with mvc pattern',
        'keywords'      => 'framework, mvc, php, mysql, jquery',
    );

    public static $pattern = array(
        'title'         => '%title%',
        'description'   => '%description%',
        'keywords'      => '%keywords%',
    );

    public static function render($part)
    {
        if (in_array($part, array_keys(self::$seo)) && in_array($part, array_keys(self::$pattern)))
        {
            return str_replace('%'.$part.'%', self::$seo[$part], self::$pattern[$part]);
        }
        return false;
    }
}
